FDTD Plus
This is a Wiki for a finite-difference time-domain (FDTD) simulation software package developed by the research group of Shanhui Fan at Stanford University. The purpose of this Wiki is to * document the software package. * allow group members to post feedback on the software. = Overview = The name of the FDTD software package is FDTD Plus. Currently, a parallel version of FDTD Plus is available to Fan group members at Shanhuiserve, Bigben, NCSA and SDSC. =User input file= In order to run FDTD Plus, a user input file must be written. This user input file contains details on the structure to be simulated, and the outputs required from the simulation. This section describes the different possible user inputs available. Inputs are grouped into five groups, namely Options, Materials, Sources, Objects and Outputs. Options This user input sets up the dimensions, boundaries and cell type for the simulation. syntax: (Option OptionType ) CellParam Defines the type of cell used in the FDTD computation including the field type. (Option CellParam (CellType value) (FieldType value) (ScalarType value) ) CellType The type of cells used to represent the materials in the computation region, value\in\{linear \} , where linear is a field independent, isotropic (direction-independent) material. FieldType The type of fields within the cell, value\in\{complex, real \} . ScalarType (optional) The scalar type of fields, coefficients etc, value\in\{double, float \} . Default value = double. DimensionParam Defines the spatial and time dimensions of the compute region. (Option DimensionParam (LengthScale (Value value) ) (Center (X value) (Y value) (Z value) ) (Size (X value) (Y value) (Z value) ) (Resolution (X value) (Y value) (Z value) ) (TimeParam (Start value) (End value) ) ) LengthScale (optional) The length scale of the compute region, value\in\mathbb{R}_{>0} . (Note : LengthScale only needs to be defined for frequency dependent or lossy materials). Center The center of the compute region, value\in\mathbb{R} (unit = LengthScale). Size The size of the compute region, value\in\mathbb{R}_{>0} (unit = LengthScale). Resolution The spatial increment in the compute region, value\in\mathbb{R}_{>0} (unit = LengthScale). TimeParam The time parameters for the FDTD run. Start (optional) The start time of computation value\in\mathbb{R} (unit = LengthScale / c, where c = speed of light in vacuum). Default value = 0. End The end time of computation value\in\mathbb{R}_{\geq{Start}} (unit = LengthScale / c). BoundaryParam Defines the boundaries of the compute region. (Option BoundaryParam (Type (X value) (Y value) (Z value) ) (PmlParam (Size (X value1 value2) (Y value1 value2) (Z value1 value2) ) (Type value) (DecayConstant value) ) (BlochKL (X value) (Y value) (Z value) ) (Symmetry (X value) (Y value) (Z value) ) ) Type The type of boundaries in the compute region, value\in\{pml, bloch, none \} , where pml is a Perfectly Matched Layer ([http://en.wikipedia.org/wiki/Perfectly_Matched_Layer PML]) boundary, bloch is a [http://en.wikipedia.org/wiki/Bloch_wave Bloch] boundary, none results in the boundary that includes the origin of the compute region to be of type PEC (E-fields parallel to boundary set to zero), and the opposite boundary of the compute region to be of type PMC (H-fields parallel to boundary set to zero). PmlParam (optional) The parameters for PML boundaries. (Note: PmlParam is only required to be defined if any BoundaryParam::Type pml). Size The size of PML boundaries. (Note 1: Size is included in DimensionParam::Size) (Note 2: Size is only required to be defined for directions with BoundaryParam::Type pml). =value1 = The PML boundary size for boundaries that include the origin of the compute region, value1\in\mathbb{R}_{\geq{0}} (unit = DimensionParam::LengthScale). =value2 (optional = The PML boundary size for boundaries that do not include the origin of the compute region, value2\in\mathbb{R}_{\geq{0}} (unit = DimensionParam::LengthScale). Default value = value2 . Type The type of PML boundary, value\in\{upml \} , where upml is a Uniaxial PML. DecayConstant (optional) The PML decay constant, value\in\mathbb{R}_{>0} (unit = c / DimensionParam::LengthScale). Default value = 1\times{10}^{-6} . BlochKL (optional) The Bloch k-vector for Bloch boundaries, value\in\mathbb{R} (unit = K\:L/2\pi , where K = Bloch k-vector, L = DimensionParam::Size). (Note 1: KL is only required to be defined for directions with BoundaryParam::Type bloch). (Note 2: When BoundaryParam::Type bloch, only KL = 0 allows CellParam::FieldType = real) Symmetry (optional) For a compute region that has mirror symmetry in any direction, this option enforces the symmetry at the center plane normal to that direction (i.e. each symmetry results in a reduction by half of the corresponding DimensionParam::Size used for FDTD computation), value\in\{pec, pmc \} , where pec results in a Perfect Electric Conductor (PEC) center plane where the E-fields parallel to the plane are set to zero. pmc results in a Perfect Magnetic Conductor (PMC) center plane where the H-fields parallel to the plane are set to zero. OutputStructure (optional) Prints the structure within the compute region into a hdf5 file. (Option OutputStructure (FileName value) ) (Note: This option is disabled by default). FileName (optional) The name of the output file, value\in{s}tring . Default value = "structure". (Note: The suffix ".h5" is added to FileName). CheckInput (optional) Option to check the user input file. This option runs the simulation up to the point before cell construction. (Option CheckInput) (Note 1: This option is disabled by default). (Note 2: This option does run OutputStructure if it is enabled). Materials This user input defines a material type. syntax: (Material MaterialType (MaterialName value) (MaterialToken value) ) MaterialName The name of the material, value\in{s}tring . (Note 1: Duplicate MaterialName values are not allowed). (Note 2: "vacuum" is a reserved MaterialName). MaterialToken The index of the material (used by OutputStructure to print material), value\in\mathbb{I}_{>0} . (Note 1: Duplicate MaterialToken values are not allowed). (Note 2: 0 is a reserved MaterialToken for "vacuum"). Lossless Defines a lossless MaterialType. (Material Lossless (MaterialName value) (MaterialToken value) (RelPermittivity value) (RelPermeability value) ) RelPermittivity The relative permittivity of the material, value\in\mathbb{R} . RelPermeability The relative permeability of the material, value\in\mathbb{R} . Lossy Defines a lossy MaterialType. (Material Lossy (MaterialName value) (MaterialToken value) (RelPermittivity value) (RelPermeability value) (Conductivity value) ) The parameters for the Lossy MaterialType is the same as a Lossless MaterialType except for the additional conductivity parameter. Conductivity The conductivity of the material, value\in\mathbb{R} . (Unit = Siemens/meter). PRP Defines an arbitrary dispersive MaterialType based on general complex-conjugate pole-residue pairs (PRP). (Material Lossless (MaterialName value) (MaterialToken value) (RelPermeability value) (EpsilonInfinity value) (PoleResiduePair (Pair1 pole_value residue_value ) (Pair2 pole_value residue_value ) | | | (PairN pole_value residue_value ) ) ) EpsilonInfinity The relative permittivity at infinite frequency, value\in\mathbb{R} . PoleResiduePair The N pole-residue pairs, pole\_value,\:residue\_value\:\in\:\mathbb{C} . (Unit = radians/sec). (Note 1: The format for pole_value/residue_value is (real_value, imag_value) ). (Note 2: PRP MaterialType can be simulated with CellParam::FieldType = real).